/**
 * 用户管理接口测试用例入口
 *
 * Created by snowingsea on 2020/01/31.
 */
const Administrator = require('./../../../models/administrator');

module.exports = describe('Test User Manager', function () {
  let userTotalNumber = 0;
  const administrator = new Administrator();

  before(function (done) {
    administrator.login()
      .then(() => administrator.getUserTotalNumber())
      .then((totalNumber) => {
        userTotalNumber = totalNumber;
        done();
      })
      .catch(done);
  });
  after(function (done) {
    administrator.getUserTotalNumber()
      .then((totalNumber) => {
        totalNumber.should.be.eql(userTotalNumber);
        done();
      })
      .catch(done);
  });

  require('./add-user.test');
  require('./delete-user.test');
  require('./delete-users.test');
  require('./edit-user.test');
  require('./get-group.test');
  require('./get-user.test');
  require('./get-users.test');
});
